Health Cloud Financial System API - Implementation Template

(0 reviews)

Developer guide

Financial Dev Guide

The US-Core Financial application uses the following DataWeave modules to map between HealthCloud and FHIR formats.

ModuleDescription
CoverageEligibilityResponseLibThis module defines functions needed to convert a FHIR CoverageEligibilityResponse resource into it's representation within Health Cloud.
UtilA library with needed dataweave utility functions.

CoverageEligibilityResponseLib

This module defines functions needed to convert a
FHIR CoverageEligibilityResponse resource into it's representation
within Health Cloud.

Source: .src/main/resources/dw/CoverageEligibilityResponseLib.dwl

Functions

fun getResultIds (res)

This function takes the results of a Salesforce query and returns a list of IDs.

param res is a Salesforce query result.
return An array with a list of Ids found.

fun getMemberPlan (fhirObj)

Converts the provided CoverageEligibilityResponse FHIR object to the HealthCloud MemberPlan object.

param fhirObj is a FHIR CoverageEligibilityResponse object.
return A HealthCloud MemberPlan object.

fun getCoverageBenefits (insurance, memberPlanId, memberId)

Converts the provided CoverageEligibilityResponse insurance object to a list of HealthCloud CoverageBenefit objects.

param insurance is a FHIR CoverageEligibilityResponse insurance object.
param memberPlanId is a string with the MemberPlan id.
param memberId is a string with the member Account Id.
return A list of HealthCloud CoverageBenefit objects.

fun getCoverageBenefitImpl (name, items, memberPlanId, memberId, benefitPeriod)

Converts the provided CoverageEligibilityResponse insurance object to a list of HealthCloud CoverageBenefit objects. This is the implementation function that's called by getCoverageBenefit. This implementation requires Salesforce version 52.

param name is the
param items is a FHIR CoverageEligibilityResponse insurance item list.
param memberPlanId is a string with the MemberPlan id.
param memberId is a string with the member Account Id.
param benefitPeriod is a Period object.
return A list of HealthCloud CoverageBenefit objects.

fun mapCoverageType (item)

Maps the coverage type with the provided item.

param item is the item to map.
return A string with the HealthCloud value or Undefined if not found.

fun allowedCategory (item)

Checks to see if the provided item is one of the supported valuse.

param item is a CoverageEligibilityResponse item object.
return A boolean with true if supported and false if not.

fun getCoverageBenefitsImpl (insurance, memberPlanId, memberId)

Gets the CoveargeBenefit objects with the provided FHIR insurance list and memberPlanId.

param insurance is a list of FHIR insurance objects.
param memberPlanId is a string with the member plan Id.
param memberId is a string with the member Account Id.
return a list of HealthCloud CoverageBenefit objects.

fun groupItems (insuranceItem)

Groups insurance items by name.

param insuranceItem is the insurance item to group.
return A list of grouped insurance items with benefitPeriod set.

fun getCoverage (memberPlan, coverageBenefits)

Converts the provided HC MemberPlan and any CoverageBenefit objects into a FHIR CoverageEligibilityResponse object.

param memberPlan is a HC MemberPlan object.
param coverageBenefits is a list of HC CoverageBenefit objects.
return A FHIR formatted CoverageEligibilityResponse object.

fun getCategory (CoverageType)

Gets the category code with the provided SF CoverageType.

param CoverageType is a String with 'Medical', 'Dental', or 'Vision'.
return The FHIR code for the category.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

Util

A library with needed dataweave utility functions.

Source: .src/main/resources/dw/Util.dwl

Functions

fun clean (obj: Object)

Cleans the provided object of blank strings, null values, empty objects, and empty arrays.

param obj is an Object to clean.
return A cleaned object.

fun clean (arr: Array)

Cleans the provided array of blank strings, null values, empty objects, and empty arrays.

param arr is an Array to clean.
return A cleaned Array.

fun removeNull (arr: Array)

Removes all null items from an array.

param arr is an array.
return An array with null items removed.

fun removeNull (obj: Object)

Removes all null values from an object.

param obj is an object.
return An object with null values removed.

fun matchReferenceReference (resource: String, ref: String)

Matches a standard reference and returns the ID portion.

param resource is a String with the resource to match. (ie Location)
param ref is the reference String to match in.
return The matched ID or null if not found.

fun matchReferenceUrl (resource: String, ref: String)

Matches a URL reference and returns the ID portion.

param resource is a String with the resource to match. (ie Location)
param ref is the reference String to match in.
return The matched ID or null if not found.

fun matchReference (resource: String, ref: String)

Matches any reference and returns the ID portion.

param resource is a String with the resource to match. (ie Location)
param ref is the reference String to match in.
return The matched ID or null if not found.

fun hasReference (resource: String, ref: String)

Checks to see if the reference exists in the provide ref String with the provided resource String name.

param resource is a String with the resource to match. (ie Location)
param ref is the reference String to match in.
return True if found and false if not.

fun getReferenceId (fhirObj, objName: String, refName: String)

This function a FHIR object and gets the reference value for the provided refName.

param fhirObj is a FHIR object to search.
param refName is a String with the reference name to match on. (Location, Practitioner ...)
return An array of reference Ids.

fun getReferenceListId (fhirObj, objName: String, refName: String)

This function a FHIR object and gets the reference value for the provided refName.

param fhirObj is a FHIR object to search.
param refName is a String with the reference name to match on. (Location, Practitioner ...)
return An array of reference Ids.

fun removeGeneratedIds (data)

Removed any generated IDs such as GUIDS from the payload for testing purposes.

param data is FHIR bundle with the data to remove IDs from.
return The FHIR bundle with generated IDs removed.

fun removeAllInstances (data, fieldNames: Array)

Recursivly removes all instances of the provided fieldName within the provided data structure.

param data is an array or object to remove the field from.
param fieldNames is a array of strings with the field names to remove.
return The data with the field removed.

(back to top)


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onOct 12, 2023
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.3
1.0.2
1.0.1
1.0.0